const obj ={
    name:'mooc',
    web:'www.imooc.com',
    course:'es'
}
// console.log(Object.keys(obj));
// const res =Object.keys(obj).map(key=>obj[key])
// console.log(res);//['mooc', 'www.imooc.com', 'es']

// console.log(Object.values(obj));
// console.log(Object.entries(obj));//0: (2) ['name', 'mooc']1: (2) ['web', 'www.imooc.com']2: (2) ['course', 'es']


for (const [key,val] of Object.entries(obj)) {
    console.log(`${key}:${val}`);
}

console.log(Object.entries(['mooc', 'www.imooc.com', 'es']));